import { request } from '@api/service'

export const fetchListApi = (params) => {
  return request({
    url: '/category/index',
    method: 'get',
    params
  })
}

export const create = (params) => {
  return request({
    url: '/category/create',
    method: 'post',
    data: params
  })
}

export const edit = (id, params) => {
  return request({
    url: `/category/create?id=${id}`,
    method: 'post',
    data: params
  })
}

export const del = (params) => {
  return request({
    url: '/help/delete-category',
    method: 'get',
    params
  })
}
